refactor: do not overwrite the error stack in json parser#604
refactor: do not overwrite the error stack in json parser#604bjohansebas wants to merge 1 commit intoexpressjs:masterfrom
Conversation
|
I didn't realize this stack manipulation was here tbh. Likely no one is matching on stacktraces from body-parser, but with things that have potentially been part of someone's monitoring stack for 8 years, Im hesitant to change it outside a major. I'd rather we keep this how it is until we decide to change error reporting in this package in a more meaningful way ala using |
|
@bjohansebas Can you please open an issue so we don't loose it for the next major version? |
|
i'd say this is a clean change, since it only modifies the error message, which is already being handled in the error.message part, and it wouldn't introduce any breaking changes. and it does make sense to migrate it to error.cause later, i’ll open an issue for that. |
to simplify the JSON parser a bit